﻿<ion-popover-view class="MvcPopover">
    <ion-header-bar>
        <button class='button button-clear button-dark button-icon ion-chevron-left' ng-click='closePopover()'>{{names.Close}}</button>
        <h1 class='title'>{{header}}</h1>
    </ion-header-bar>
    <ion-header-bar class='bar-subheader item-input-inset'>
        <label ng-class="searchFocus?'focused item-input-wrapper search':'blured item-input-wrapper search'">
            <i class='icon-search placeholder-icon'></i>
            <input type='search' placeholder='{{names.Search}}' ng-model='searchText' ng-focus="searchAnimate()" ng-blur="searchAnimate()" ng-keyup="searChange()" />
        </label>
    </ion-header-bar>
    <ion-content>
        <ion-list>
            <ion-checkbox ng-repeat='item in CheckListDisplay| filter:searchText'
                          ng-model='item.checked' ng-click='clickCheckList()'>
                {{item.text}}
            </ion-checkbox>
        </ion-list>
        <ion-item ng-show="searchNum==0&&searchText!=''" style="cursor:pointer">
            <div class="item-icon-left" style="padding-left:20px;">
                <h2 style="margin-left:10px;" ng-show="{{names.SheetUser.isShow}}">未搜索到与 “ <span class="overSearch" ng-bind="searchText">{{searchText}}</span> ” 相关的结果</h2>
                <h2 style="margin-left:10px;" ng-show="{{!names.SheetUser.isShow}}">{{names.SheetUser.result}}<span class="overSearch" ng-bind="searchText">{{searchText}}</span> </h2>
            </div>
        </ion-item>
    </ion-content>
    <ion-footer-bar>
        <div class="footer-left" ng-click="selectAll()" ng-if="!allSelected">{{names.SelectAll}}</div>
        <div class="footer-left" ng-click="unSelectAll()" ng-if="allSelected">{{names.UnselectAll}}</div>
        <div ng-click="hide()" class="close footer-right">{{names.OK}}</div>
    </ion-footer-bar>
</ion-popover-view>
<style>
    .MvcPopover .item-checkbox .item-content {
        max-width: 90%;
        white-space: normal;
    }
</style>




<!--<ion-checkbox ng-repeat='item in CheckListDisplay| filter:searchText'
              ng-model='item.checked'
              ng-checked='item.checked' ng-click='clickCheckList()'>
    {{item.text}}
</ion-checkbox>-->